package com.atguigu.gmall.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class PassportController {

    //  http://passport.gmall.com/login.html?originUrl=http://www.gmall.com/

    /**
     * 登录页面
     * @param request
     * @return
     */
    @GetMapping("login.html")
    public String login(HttpServletRequest request){
        //  存储数据
        request.setAttribute("originUrl",request.getParameter("originUrl"));
        //  返回登录页面
        return "login";
    }
}
